package com.taldh.utils.beancopy;

public enum Grade {

    Grade1(1, "111"),
    Grade2(2, "222");

    public static Grade find(Integer code) {
        for (Grade item : Grade.values()) {
            if (item.getCode().equals(code)) {
                return item;
            }
        }
        return null;
    }


    private Integer code;
    private String msg;

    Grade(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
